# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=flamegraph
pkgver=1.0_git20191025
_commit=1a0dc6985aad06e76857cf2a354bd5ba0c9ce96b
pkgrel=0
pkgdesc="Stack trace visualizer"
url="http://www.brendangregg.com/flamegraphs.html"
arch="noarch"
license="CDDL-1.0"
depends="perl gawk"
options="!check" # no tests
source="$pkgname-$pkgver.tar.gz::https://github.com/brendangregg/FlameGraph/archive/$_commit.tar.gz"
builddir="$srcdir/FlameGraph-$_commit"

package() {
	mkdir -p "$pkgdir"/usr/share/flamegraph "$pkgdir"/usr/bin
	for x in *.pl; do
		install -m755 $x "$pkgdir"/usr/share/flamegraph
		ln -s ../share/flamegraph/$x "$pkgdir"/usr/bin/${x/.pl/}
	done
}

sha512sums="b02719e6df9d371f03cc0d56c3451fdb361bd4dadd30929ed22d7ec813400fdb27b1961941233554bb653153d55b29da36def27b21325c6b4c2744f40652bddb  flamegraph-1.0_git20191025.tar.gz"
